#pragma once
#include "Resource.h"

class CMainCommand : public saf::CNotifyCommandImpl<CMainCommand>
{

public:
	void OnHelp(UINT nCmdID, saf::ICommandItem *pCmdUI);
	void OnAppExit(UINT nCmdID, saf::ICommandItem *pCmdUI);
	void OnAbout(UINT nCmdID, saf::ICommandItem *pCmdUI);
	void OnViewThemeSetup();
	void OnViewSetupLanguage();
	BEGIN_NC_MAP()
		NC_COMMAND_ID_CMDUI(ID_APP_EXIT, OnAppExit)
		NC_COMMAND_ID_CMDUI(ID_HELP, OnHelp)
		NC_COMMAND_ID_CMDUI(ID_APP_ABOUT, OnAbout)
		NC_COMMAND_NULL(ID_TOOLS_SETUP_THEME, OnViewThemeSetup);
		NC_COMMAND_NULL(ID_TOOLS_LANGUAGE, OnViewSetupLanguage);
	END_NC_MAP()

	void OnQueryAppExit(saf::ICommandItem *pCmdUI);
	void OnQueryHelp(saf::ICommandItem *pCmdUI);
	void OnQueryAppAbout(saf::ICommandItem *pCmdUI);
	BEGIN_QUERY_STATE_MAP()
		QUERY_STATE_UI(ID_APP_EXIT, OnQueryAppExit)
		QUERY_STATE_UI(ID_HELP, OnQueryHelp)
		QUERY_STATE_UI(ID_APP_ABOUT, OnQueryAppAbout)
		QUERY_STATE_ENABLE(ID_TOOLS_SETUP_THEME)
		QUERY_STATE_ENABLE(ID_TOOLS_LANGUAGE)
	END_QUERY_STATE_MAP()
	CMainCommand(void);
	~CMainCommand(void);
};

